load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

SRC_FILE_LIST = glob(["src_not_package/not_package/*.cpp"])

SRC_FILE_LIST.append(":scoff_person.cpp")

print("SRC_FILE_LIST=", SRC_FILE_LIST)

cc_library(
    name = "datastructure",
    srcs =
        # [
        # ":scoff_person.cpp",
        # ":src_not_package/not_package/adjGraph.cpp",
        # ":src_not_package/not_package/student.cpp",

        # ],
        SRC_FILE_LIST,
    hdrs = [
        ":h_not_package/to_include1/student.h",
        ":h_not_package/to_include2/graph.h",
    ],
    includes = ["./h_not_package/"],
    visibility = ["//data_structure/graph_kit:__pkg__"],
)

cc_binary(
    name = "unit_test.exe",
    srcs = [":unit_test.cpp"],
    deps = [":datastructure"],
)

# 无法访问包之外的任何文件, 即使是子文件夹
# 删除子文件夹中的文件BUILD即可访问
# cc_binary(
#     name = "hello.exe",
#     srcs = [":graph_kit/not_a_package/hello_world.cpp"],
# )
